package com.qfmy.web.app.controller.novel;


import com.qfmy.common.result.Result;
import com.qfmy.model.vo.novel.NovelCarouselVo;
import com.qfmy.web.app.service.novel.NovelCarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 清风明月
 * @Package com.qfmy.web.app.controller.novel
 * @date 2025/10/31
 * @description 小说的轮播图
 */
@RestController
@RequestMapping("/app")
public class NovelCarouselController {

    /**
     * 注入service
     */
    @Autowired
    private NovelCarouselService novelCarouselService;

    /**
     * 获取排布的小说轮播图
     */
    @RequestMapping("/getVerticalCarousel")
    public Result<List<NovelCarouselVo>> getVerticalCarousel(@RequestParam Integer position) {
        List<NovelCarouselVo> list = novelCarouselService.getVerticalCarousel(position);
        return Result.ok(list);
    }

}
